package com.systop.busafter.task.service.impl;
import com.systop.busafter.task.mapper.TaskMapper;
import com.systop.busafter.task.service.TaskService;
import com.systop.commer.pojo.Task;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class TaskServiceImpl implements TaskService {

    @Autowired
    private TaskMapper taskMapper;

    @Override
    @CacheEvict(value = "TaskId",key = "'task.taskid'")
    public int updatatask(Task task) {
        return taskMapper.updatatask(task);
    }

    @Override
    public int inserttask(Task task) {
        return taskMapper.inserttask(task);
    }

    @Override
    public List<Task> taskListall() {
        return taskMapper.taskListall();
    }

    @Override
    public List<Task> taskIdlist(int task_id) {
        return taskMapper.taskIdlist(task_id);
    }

    @Override
    @Cacheable(value = "TaskId",key = "'task.taskid'")
    public Task TaskId(int task_id) {
        return taskMapper.TaskId(task_id);
    }

    @Override
    public int deletetask(int task_id) {
        return taskMapper.deletetask(task_id);
    }

    @Override
    public List<Task> taskordernumberList(int task_order_number) {
        return taskMapper.taskordernumberList(task_order_number);
    }
    @Override
    public List<Task> Tobeconfirmed(Task task) {
        return taskMapper.Tobeconfirmed(task);
    }

    @Override
    public List<Task> usertasktrueing(Task task) {
        return taskMapper.usertasktrueing(task);
    }

    @Override
    public List<Task> taskdeiverall(int task_state1) {
        return taskMapper.taskdeiverall(task_state1);
    }

    @Override
    public List<Task> deivertasktrueing(Task task) {
        return taskMapper.deivertasktrueing(task);
    }
}
